home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / toolboxsas.lha / Toolbox / lib / include / Errors.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-15  |  2.3 KB  |  84 lines

  1. #ifndef yyErrors
  2. #define yyErrors
  3.  
  4. /* $Id: Errors.h,v 1.1 1992/08/13 12:14:11 grosch rel $ */
  5.  
  6. /* $Log: Errors.h,v $
  7.  * Revision 1.1  1992/08/13  12:14:11  grosch
  8.  * deleted redefinition of bool
  9.  *
  10.  * Revision 1.0  1992/08/07  14:31:41  grosch
  11.  * Initial revision
  12.  *
  13.  */
  14.  
  15. /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
  16.  
  17.  
  18. #include <stdio.h>
  19. #include "ratc.h"
  20. #include "Positions.h"
  21.  
  22. #define xxNoText         0 /* error codes */
  23. #define xxSyntaxError    1
  24. #define xxExpectedTokens 2
  25. #define xxRestartPoint   3
  26. #define xxTokenInserted  4
  27. #define xxTooManyErrors  5
  28.  
  29. #define xxFatal       1 /* error classes */
  30. #define xxRestriction 2
  31. #define xxError       3
  32. #define xxWarning     4
  33. #define xxRepair      5
  34. #define xxNote        6
  35. #define xxInformation 7
  36.  
  37. #define xxNone      0 /* info classes */
  38. #define xxInteger   1
  39. #define xxShort     2
  40. #define xxLong      3
  41. #define xxReal      4
  42. #define xxBoolean   5
  43. #define xxCharacter 6
  44. #define xxString    7
  45. #define xxSet       8
  46. #define xxIdent     9
  47.  
  48.  
  49. extern void (*Errors_Exit)(void);
  50. /* Refers to a procedure that specifies  */
  51. /* what to do if 'ErrorClass' = Fatal.   */
  52. /* Default: terminate program execution. */
  53.  
  54.  
  55. void StoreMessages(bool Store);
  56. /* Messages are stored if 'Store' = TRUE         */
  57. /* for printing with the routine 'WriteMessages' */
  58. /* otherwise they are printed immediately.       */
  59. /* If 'Store'=TRUE the message store is cleared. */
  60.  
  61. void ErrorMessage(int ErrorCode, int ErrorClass, tPosition Position);
  62. /* Report a message represented by an integer  */
  63. /* 'ErrorCode' and classified by 'ErrorClass'. */
  64.  
  65. void ErrorMessageI(int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char *Info);
  66. /* Like the previous routine with additional */
  67. /* information of type 'InfoClass' at the    */
  68. /* address 'Info'.                           */
  69.  
  70. void Message(char *ErrorText, int ErrorClass, tPosition Position);
  71. /* Report a message represented by a string    */
  72. /* 'ErrorText' and classified by 'ErrorClass'. */
  73.  
  74. void MessageI(char *ErrorText, int ErrorClass, tPosition Position, int InfoClass, char *Info);
  75. /* Like the previous routine with additional */
  76. /* information of type 'InfoClass' at the    */
  77. /* address 'Info'.                           */
  78.  
  79. void WriteMessages(FILE *File);
  80. /* The stored messages are sorted by their */
  81. /* source position and printed on 'File'.  */
  82.  
  83. #endif
  84.